# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=spectacle
pkgver=20.04.3
pkgrel=0
pkgdesc="Application for capturing desktop screenshots"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://kde.org/applications/utilities/org.kde.spectacle"
license="GPL-2.0-only"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtx11extras-dev kcoreaddons-dev kwidgetsaddons-dev kdbusaddons-dev knotifications-dev kconfig-dev ki18n-dev kio-dev kwindowsystem-dev kdoctools-dev knewstuff-dev kdeclarative-dev libkipi-dev purpose-dev kwayland-dev xcb-util-image-dev xcb-util-cursor-dev libxcb-dev xcb-util-renderutil-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/spectacle-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="ba2fdcf4c57efe213e79638a0b81c3061e2df432a4702b2d4830dfb3ed9c2f10cd6573b678b153a95414fee4807320345001f416db348a2b6633afbc5b93c546  spectacle-20.04.3.tar.xz"
